package com.shenmazong.servereduschool.controller;


import com.shenmazong.servereduschool.entity.TbStage;
import com.shenmazong.servereduschool.service.ITbStageService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.BatchChooseIdVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 阶段（课程表）——suliven 前端控制器
 * </p>
 *
 * @author 关好帅
 * @since 2021-09-22
 */
@RestController
@RequestMapping("/stage")
public class TbStageController {
    @Autowired
    private ITbStageService stageService;

    /**
     * @description 创建课程
     * @author GuanJiaHe
     * @date 2021/9/22 13:58
     * @version 1.0
     */
    @PostMapping("createStage")
    public ResultResponse createStage(@RequestBody TbStage stage){
        return stageService.createStage(stage);
    }

    @DeleteMapping("deleteStage")
    public ResultResponse deleteStage(@RequestBody BatchChooseIdVo idVo){
        return stageService.deleteStage(idVo);
    }

    @PostMapping("updateStage")
    public ResultResponse updateStage(@RequestBody TbStage stage){
        return stageService.updateStage(stage);
    }
}
